package com.wondertek.poms.service.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.groups.Default;
import java.util.Date;

@Data
public class ChannelPackageVo {

    private Long id;

    @NotBlank(message = "渠道ID不能为空", groups = {Default.class})
    @Pattern(regexp="[,0-9]*", message="渠道Id只能为数字串" ,groups = {Default.class, GroupType.Update.class, GroupType.Delete.class})
    private String channelId;

    @NotBlank(message = "渠道包名称不能为空", groups = {Default.class})
    @Length(message = "渠道包长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String name;

    @Range(message = "渠道包类型 1:垂直栏目 2: 品牌栏目 3:V+ 4:分站 5:G客G拍 6:本地 7:和视界 8：其他 范围是[1-8]", min=1, max=8, groups = {Default.class})
    @NotNull(message = "渠道包类型不能为null")
    private Integer property;

    private Integer isPublish;  //0:未发布；1：发布

    @Length(message = "描述长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String detail;

}
